import { useDispatch } from "react-redux";
import { Filter } from "./cpns/entire-filter";
import { useEffect } from "react";
import { fetchEntireData } from "../../store/moduels/entire";
import { EntireRoomList } from "./cpns/entire-rooms";
import { MyPagination } from "./cpns/entire-pagination";
import { EntireWrapper } from "./style";
import { changeHeaderCofiig } from "../../store/moduels/main";

const Entire = () => {
    const dispach = useDispatch();
    useEffect(() => {
        dispach(fetchEntireData(1, 20)); 
        dispach(changeHeaderCofiig(true));
    },[])
    return (
        <EntireWrapper>
             <Filter></Filter>
            <EntireRoomList></EntireRoomList>
            <MyPagination></MyPagination>
         </EntireWrapper>  
    )
}
export default Entire;